# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nasm
pkgver=2.16.03
pkgrel=0
pkgdesc="80x86 assembler designed for portability and modularity"
url="https://www.nasm.us"
arch="all"
license="BSD-2-Clause"
checkdepends="perl"
subpackages="$pkgname-doc"
source="https://www.nasm.us/pub/nasm/releasebuilds/$pkgver/nasm-$pkgver.tar.xz"

build() {
	CFLAGS="$CFLAGS -O2 -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
0c706e41a9c33e1ac3bad5056e8bf8cbcd51785b551a6e34ce7d0d723df8eaab8603a033e89b3dcda1004b558f9e9ef3196691500f10d8201bf47a323a516f84  nasm-2.16.03.tar.xz
"
